﻿@model IEnumerable<ClientMaster>
@{
    ViewBag.Title = "Dash Board";
    WebGrid grid = new WebGrid(Model,rowsPerPage:5);
}

<style>
    .webgrid-table {
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 1.2em;
        width: 100%;
        display: table;
        border-collapse: separate;
        border: solid 1px #98BF21;
        background-color: white;
    }

        .webgrid-table td, th {
            border: 1px solid #98BF21;
            padding: 3px 7px 2px;
        }

    .webgrid-header {
        background-color: #A7C942;
        color: #FFFFFF;
        padding-bottom: 4px;
        padding-top: 5px;
        text-align: left;
    }

    .webgrid-footer {
    }

    .webgrid-row-style {
        padding: 3px 7px 2px;
    }

    .webgrid-alternating-row {
        background-color: #EAF2D3;
        padding: 3px 7px 2px;
    }
</style>
<div class="jumbotron">
    <h1>Consolidate Layer</h1>

</div>

<div class="row">
    <div class="col-md-12">
        <div id="tblGrid">
            @grid.GetHtml(tableStyle: "webgrid-table",
        headerStyle: "webgrid-header",
        footerStyle: "webgrid-footer",
        alternatingRowStyle: "webgrid-alternating-row",
        selectedRowStyle: "webgrid-selected-row",
        rowStyle: "webgrid-row-style",nextText:"Next",previousText:"Prev",
            columns: grid.Columns(/*grid.Column("ID", format: (item) => item.GetSelectLink(item.ID.ToString())),*/
            grid.Column("FirstName", "First Name"),
            grid.Column("City", "City"),
            grid.Column("State", "State"),
            grid.Column("ZipCode", "Zip-Code"),
            grid.Column("Email", "Email"),
            grid.Column("PanCard", "PanCard"),
            grid.Column("TinNumber", "TinNumber")))
        </div>

        @*<h3>Selected row</h3>
        @if (grid.HasSelection)
        {
            var pd = (ClientMaster)grid.Rows[grid.SelectedIndex].Value;
            <p>First Name: @pd.FirstName</p>
            <p>Last Name: @pd.City</p>
            <p>Age: @pd.State</p>
            <p>Age: @pd.ZipCode</p>
            <p>Age: @pd.Email</p>
            <p>Age: @pd.PanCard</p>
            <p>Age: @pd.TinNumber</p>
        }*@
    </div>
</div>